#ifndef KEYVALUE_H
#define KEYVALUE_H

#include <assert.h>

namespace keylog {
	enum KeyValue {
		value_first,

		value_reserved = value_first,
		value_esc,
		value_1,
		value_2,
		value_3,
		value_4,
		value_5,
		value_6,
		value_7,
		value_8,
		value_9,
		value_0,
		value_minus,
		value_equal,
		value_backspace,
		value_tab,
		value_q,
		value_w,
		value_e,
		value_r,
		value_t,
		value_y,
		value_u,
		value_i,
		value_o,
		value_p,
		value_leftbrace,
		value_rightbrace,
		value_enter,
		value_leftctrl,
		value_a,
		value_s,
		value_d,
		value_f,
		value_g,
		value_h,
		value_j,
		value_k,
		value_l,
		value_semicolon,
		value_apostrophe,
		value_grave,
		value_leftshift,
		value_backslash,
		value_z,
		value_x,
		value_c,
		value_v,
		value_b,
		value_n,
		value_m,
		value_comma,
		value_dot,
		value_slash,
		value_rightshift,
		value_kpasterisk,
		value_leftalt,
		value_space,
		value_capslock,
		value_f1,
		value_f2,
		value_f3,
		value_f4,
		value_f5,
		value_f6,
		value_f7,
		value_f8,
		value_f9,
		value_f10,
		value_numlock,
		value_scrolllock,
		value_kp7,
		value_kp8,
		value_kp9,
		value_kpminus,
		value_kp4,
		value_kp5,
		value_kp6,
		value_kpplus,
		value_kp1,
		value_kp2,
		value_kp3,
		value_kp0,
		value_kpdot,
		value_zenkakuhankaku,
		value_102nd,
		value_f11,
		value_f12,
		value_ro,
		value_katakana,
		value_hiragana,
		value_henkan,
		value_katakanahiragana,
		value_muhenkan,
		value_kpjpcomma,
		value_kpenter,
		value_rightctrl,
		value_kpslash,
		value_sysrq,
		value_rightalt,
		value_linefeed,
		value_home,
		value_up,
		value_pageup,
		value_left,
		value_right,
		value_end,
		value_down,
		value_pagedown,
		value_insert,
		value_delete,
		value_macro,
		value_mute,
		value_volumedown,
		value_volumeup,
		value_power,
		value_kpequal,
		value_kpplusminus,
		value_pause,
		value_kpcomma,
		value_hanguel,
		value_hanja,
		value_yen,
		value_leftmeta,
		value_rightmeta,
		value_compose,
		value_stop,
		value_again,
		value_props,
		value_undo,
		value_front,
		value_copy,
		value_open,
		value_paste,
		value_find,
		value_cut,
		value_help,
		value_menu,
		value_calc,
		value_setup,
		value_sleep,
		value_wakeup,
		value_file,
		value_sendfile,
		value_deletefile,
		value_xfer,
		value_prog1,
		value_prog2,
		value_www,
		value_msdos,
		value_coffee,
		value_direction,
		value_cyclewindows,
		value_mail,
		value_bookmarks,
		value_computer,
		value_back,
		value_forward,
		value_closecd,
		value_ejectcd,
		value_ejectclosecd,
		value_nextsong,
		value_playpause,
		value_previoussong,
		value_stopcd,
		value_record,
		value_rewind,
		value_phone,
		value_iso,
		value_config,
		value_homepage,
		value_refresh,
		value_exit,
		value_move,
		value_edit,
		value_scrollup,
		value_scrolldown,
		value_kpleftparen,
		value_kprightparen,
		value_f13,
		value_f14,
		value_f15,
		value_f16,
		value_f17,
		value_f18,
		value_f19,
		value_f20,
		value_f21,
		value_f22,
		value_f23,
		value_f24,
		value_playcd,
		value_pausecd,
		value_prog3,
		value_prog4,
		value_suspend,
		value_close,
		value_play,
		value_fastforward,
		value_bassboost,
		value_print,
		value_hp,
		value_camera,
		value_sound,
		value_question,
		value_email,
		value_chat,
		value_search,
		value_connect,
		value_finance,
		value_sport,
		value_shop,
		value_alterase,
		value_cancel,
		value_brightnessdown,
		value_brightnessup,
		value_media,
		value_unknown,

		value_last
	};

	inline KeyValue& operator++(KeyValue& keyValue) {
		assert(keyValue != value_last);
		keyValue = static_cast<KeyValue>(keyValue + 1);
		return keyValue;
	}
	inline KeyValue operator++(KeyValue& keyValue, int) {
		assert(keyValue != value_last);
		++keyValue;
		return static_cast<KeyValue>(keyValue - 1);
	}
}

#endif
